package com.htc.controller;
import com.htc.common.ActionEvent;
import com.htc.constants.Constants;
import com.htc.dlc.AboutActivity;
import com.htc.dlc.EventsActivity;
import com.htc.dlc.fragment.FragmentAboutClup;
import com.htc.dlc.fragment.FragmentAboutGrace;
import com.htc.model.utils.AboutModel;
import com.htc.model.utils.EventsModel;

public class AboutsController {
	public static AboutsController instance;

	public static AboutsController getInstance() {
		if (instance == null)
			instance = new AboutsController();
		return instance;
	}

	public void handleViewEvent(ActionEvent e) {
		switch (e.action) {
		case Constants.GET_ABOUT_CLUP:
			AboutModel.getInstance().handleControllerEvent(e);
			break;
		case Constants.GET_ABOUT_GRACE:
			AboutModel.getInstance().handleControllerEvent(e);
			break;
		default:
			break;
		}
	}

	public void handleModelViewEvent(ActionEvent e) {
		switch (e.action) {
		case Constants.GET_ABOUT_CLUP:{
			FragmentAboutClup clup = (FragmentAboutClup)e.sender;
			clup.handleControllerViewEvent(e);
		}
			break;
		case Constants.GET_ABOUT_GRACE:{
			FragmentAboutGrace grace = (FragmentAboutGrace)e.sender;
			grace.handleControllerViewEvent(e);			
		}
		break;
		
		default:
			break;
		}
	}
}
